Intro

This just shows a brief example of how you can start a game and trigger turns to progress.

library(MundusCentrum)

Setup the game

game <- new_game(
  name = "Anno Duo",
  players = list(
    list(
      name = "Big Grizz",
      team = "Dark Angels",
      units = system.file("extdata", "unit-templates", "big_grizz.csv", package = "MundusCentrum")
    ),
    list(
      name = "Eric",
      team = "Necrons",
      units = system.file("extdata", "unit-templates", "eric.csv", package = "MundusCentrum")
    ),
    list(
      name = "Chris",
      team = "Tyranids",
      units = system.file("extdata", "unit-templates", "chris.csv", package = "MundusCentrum")
    )
  ),
  points = 3000
)
## Warning: Unnamed `col_types` should have the same length as `col_names`. Using
## smaller of the two.
## All units resolved.

see the starting point

This is the state of the game at the beginning

res <- reconcile_player_orders(game)
## Warning: Unnamed `col_types` should have the same length as `col_names`. Using
## smaller of the two.
## All units resolved.
print(draw_map(res))

knitr::kable(res)
player loc unit_id unit_type action unit_name
chris A5 1 flying_hive_tryant control Lucky Demon
chris A5 2 flying_hive_tryant control Shriekin’ Worlock
chris A5 3 broodlord control Michael Fine
chris A5 4 broodlord control Judith Sherman
chris A5 5 neurothrope control Bittah Specialist
chris A5 6 tyranid_warriors control Charlotte Jenkins
chris A5 7 tyranid_warriors control Taylor Rodgers
chris A5 8 tyranid_warriors control Aubrey Medina
chris A5 9 genestealers control Logan Turner
chris A5 10 genestealers control Aaliyah Warner
chris A5 11 termagants control Adrian Mcdaniel
chris A5 12 hormagaunts control Daniel Silva
chris A5 13 ripper_swarms control Edmund Burke
chris A5 14 ripper_swarms control Julia Kristeva
chris A5 15 ripper_swarms control Zoe Barrett
chris A5 16 hive_guard control Connor Gutierrez
chris A5 17 maleceptor control Rowan Fitzgerald
chris A5 18 venomthropes control Makayla Ross
chris A5 19 raveners control Lin-Manuel Miranda
chris A5 20 gargoyles control Andy Serkis
chris A5 21 gargoyles control Dogface Desperado
chris A5 22 exocrine control Jesus Andrews
chris A5 23 biovores control Isaac Carpenter
chris A5 24 biovores control Grace Wagner
chris A5 25 tyrannocyte control Michael Crichton
big_grizz D4 1 ravenwing_talonmaster control Henry Fonda
big_grizz D4 2 deathwing_captain control Aristotle
big_grizz D4 3 techmarine control Gianna Walsh
big_grizz D4 4 phobos_librarian control Bee Gees, Albhy Galuten & Karl Richardson
big_grizz D4 5 tactical_squad control Faith Lane
big_grizz D4 6 tactical_squad control Marcus Avila
big_grizz D4 7 tactical_squad control Elias Figueroa
big_grizz D4 8 tactical_squad control Trinity Schroeder
big_grizz D4 9 infiltrators control Kinsley Roman
big_grizz D4 10 ravenwing_bike_squad control Robert Downey
big_grizz D4 11 ravenwing_attack_bike control Fred MacMurray
big_grizz D4 12 ravenwing_attack_bike control Jean Simmons
big_grizz D4 13 dreadnought control Easton Morgan
big_grizz D4 14 redemptor_dreadnought control Emery Gallegos
big_grizz D4 15 invictor_tactical_warsuit control Phil Ramone
big_grizz D4 16 ravenwing_apothecary control Salman Khan
big_grizz D4 17 deathwing_terminators control Alan Watts
big_grizz D4 18 deathwing_knights control Gottfried Leibniz
big_grizz D4 19 vindicare_assassin control Toto
big_grizz D4 20 eliminators control Quincy Jones
big_grizz D4 21 eradicators control Kaleb Daniels
big_grizz D4 22 storm_raven control Steve Eddins Norman
big_grizz D4 23 rhino control Bob Bergen
eric G7 1 trazyn_the_infinite control Oliver Reyes
eric G7 2 illuminor_szeras control Christopher Rivas
eric G7 3 technomancer control Jean-Paul Sartre
eric G7 4 lychgaurd control Alice Carrillo
eric G7 5 skorpekh_destroyers control Adalynn Mcgee
eric G7 6 canoptek_plasmacyte control The God
eric G7 7 immortals control Isabella Calderon
eric G7 8 canoptek_spyders control Violent Observer
eric G7 9 canoptek_spyders control Wicked Commander
eric G7 10 cryptothralls control Alexander Ortega
eric G7 11 cryptothralls control Layla Fleming
eric G7 12 canoptek_scarab_swarms control John Wayne
eric G7 13 canoptek_wraiths control Benedict Cumberbatch
eric G7 14 deathmarks control George Berkeley
eric G7 15 night_scythe control Lazy-assed Bandit
eric G7 16 overlord control Aurora Soto
eric G7 17 royal_warden control Alexa Davidson
eric G7 18 necron_warriors control Paisley Molina
eric G7 19 immortals control Jaxson Delacruz
eric G7 20 canoptek_scarab_swarms control Smilin’ Swami
eric G7 21 canoptek_scarab_swarms control Ol’ Dirty Mastermind
eric G7 22 night_scythe control Zexy Destroyer
eric G7 23 overlord control Gavin Warren
eric G7 24 royal_warden control Julia Clarke
eric G7 25 immortals control Lillian Pham
eric G7 26 necron_warriors control King Larson
eric G7 27 canoptek_scarab_swarms control Gwyneth Paltrow
eric G7 28 canoptek_scarab_swarms control Marlon Brando

Turn play

Get a list of unit ID’s to easily make the modify_unit() calls below.

moby_units <- read_player_map(game, "big_grizz") %>% pull(unit_name)
eric_units <- read_player_map(game, "eric") %>% pull(unit_name)
chris_units <- read_player_map(game, "chris") %>% pull(unit_name)

TURN 1

Players change their maps (making orders)

modify_unit(game, "big_grizz", moby_units[1],   "move",  "C2")
modify_unit(game, "big_grizz", moby_units[c(2, 7, 17, 18)],   "control",  "D4")
modify_unit(game, "big_grizz", moby_units[c(3, 5:6, 13, 22)],   "soar",  "H2") # transport
modify_unit(game, "big_grizz", moby_units[c(8, 23)],   "move",  "C5") # transport
modify_unit(game, "big_grizz", moby_units[9],   "move",  "F5")
modify_unit(game, "big_grizz", moby_units[c(10:12, 16)],   "move",  "D1")
modify_unit(game, "big_grizz", moby_units[c(14:15, 19:21)],   "move",  "F5")

modify_unit(game, "eric",      eric_units[c(1:6, 13:14, 8:11)],   "move",  "E7")
modify_unit(game, "eric",      eric_units[7],     "control","G7")
modify_unit(game, "eric",      eric_units[12],     "move","E5")
modify_unit(game, "eric",      eric_units[15:18],   "soar","I4") # transport
modify_unit(game, "eric",      eric_units[19],   "move","G6")
modify_unit(game, "eric",      eric_units[20],   "move","E6")
modify_unit(game, "eric",      eric_units[21],   "move","E4")
modify_unit(game, "eric",      eric_units[c(22:24, 26)],   "soar", c("G8","H3")) # transport
modify_unit(game, "eric",      eric_units[25],   "move","G8")
modify_unit(game, "eric",      eric_units[27],   "move","F4")
modify_unit(game, "eric",      eric_units[28],   "move","F8")

modify_unit(game, "chris",     chris_units[c(6, 13)],  "move","A2")
modify_unit(game, "chris",     chris_units[c(5, 7, 8, 12, 23)],  "move","A3")
modify_unit(game, "chris",     chris_units[1],  "move","A4")
modify_unit(game, "chris",     chris_units[c(10, 14, 24)],  "move","A6")
modify_unit(game, "chris",     chris_units[c(3, 9, 17, 18, 22)],  "move","A7")
modify_unit(game, "chris",     chris_units[2],  "move","A8")
modify_unit(game, "chris",     chris_units[19],  "move","B10")
modify_unit(game, "chris",     chris_units[21],  "move","B11")
modify_unit(game, "chris",     chris_units[c(4, 15)],  "move","B7")
modify_unit(game, "chris",     chris_units[20],  "move","E1")
modify_unit(game, "chris",     chris_units[c(11, 16, 25)],  "control","A5")

Attempt to reconcile moves.

res <- reconcile_player_orders(game)
## Warning: Unnamed `col_types` should have the same length as `col_names`. Using
## smaller of the two.
## All units resolved.
print(draw_map(res))

knitr::kable(res)
player loc unit_id unit_type action unit_name
chris A2 6 tyranid_warriors move Charlotte Jenkins
chris A2 13 ripper_swarms move Edmund Burke
chris A3 5 neurothrope move Bittah Specialist
chris A3 7 tyranid_warriors move Taylor Rodgers
chris A3 8 tyranid_warriors move Aubrey Medina
chris A3 12 hormagaunts move Daniel Silva
chris A3 23 biovores move Isaac Carpenter
chris A4 1 flying_hive_tryant move Lucky Demon
chris A5 11 termagants control Adrian Mcdaniel
chris A5 16 hive_guard control Connor Gutierrez
chris A5 25 tyrannocyte control Michael Crichton
chris A6 10 genestealers move Aaliyah Warner
chris A6 14 ripper_swarms move Julia Kristeva
chris A6 24 biovores move Grace Wagner
chris A7 3 broodlord move Michael Fine
chris A7 9 genestealers move Logan Turner
chris A7 17 maleceptor move Rowan Fitzgerald
chris A7 18 venomthropes move Makayla Ross
chris A7 22 exocrine move Jesus Andrews
chris A8 2 flying_hive_tryant move Shriekin’ Worlock
chris B10 19 raveners move Lin-Manuel Miranda
chris B11 21 gargoyles move Dogface Desperado
chris B7 4 broodlord move Judith Sherman
chris B7 15 ripper_swarms move Zoe Barrett
big_grizz C2 1 ravenwing_talonmaster move Henry Fonda
big_grizz C5 8 tactical_squad move Trinity Schroeder
big_grizz C5 23 rhino move Bob Bergen
big_grizz D1 10 ravenwing_bike_squad move Robert Downey
big_grizz D1 11 ravenwing_attack_bike move Fred MacMurray
big_grizz D1 12 ravenwing_attack_bike move Jean Simmons
big_grizz D1 16 ravenwing_apothecary move Salman Khan
big_grizz D4 2 deathwing_captain control Aristotle
big_grizz D4 4 phobos_librarian control Bee Gees, Albhy Galuten & Karl Richardson
big_grizz D4 7 tactical_squad control Elias Figueroa
big_grizz D4 17 deathwing_terminators control Alan Watts
big_grizz D4 18 deathwing_knights control Gottfried Leibniz
chris E1 20 gargoyles move Andy Serkis
eric E4 21 canoptek_scarab_swarms move Ol’ Dirty Mastermind
eric E5 12 canoptek_scarab_swarms move John Wayne
eric E6 20 canoptek_scarab_swarms move Smilin’ Swami
eric E7 1 trazyn_the_infinite move Oliver Reyes
eric E7 2 illuminor_szeras move Christopher Rivas
eric E7 3 technomancer move Jean-Paul Sartre
eric E7 4 lychgaurd move Alice Carrillo
eric E7 5 skorpekh_destroyers move Adalynn Mcgee
eric E7 6 canoptek_plasmacyte move The God
eric E7 8 canoptek_spyders move Violent Observer
eric E7 9 canoptek_spyders move Wicked Commander
eric E7 10 cryptothralls move Alexander Ortega
eric E7 11 cryptothralls move Layla Fleming
eric E7 13 canoptek_wraiths move Benedict Cumberbatch
eric E7 14 deathmarks move George Berkeley
eric F4 27 canoptek_scarab_swarms move Gwyneth Paltrow
big_grizz F5 9 infiltrators move Kinsley Roman
big_grizz F5 14 redemptor_dreadnought move Emery Gallegos
big_grizz F5 15 invictor_tactical_warsuit move Phil Ramone
big_grizz F5 19 vindicare_assassin move Toto
big_grizz F5 20 eliminators move Quincy Jones
big_grizz F5 21 eradicators move Kaleb Daniels
eric F8 28 canoptek_scarab_swarms move Marlon Brando
eric G6 19 immortals move Jaxson Delacruz
eric G7 7 immortals control Isabella Calderon
eric G8 25 immortals move Lillian Pham
eric G8 23 overlord soar Gavin Warren
big_grizz H2 3 techmarine soar Gianna Walsh
big_grizz H2 5 tactical_squad soar Faith Lane
big_grizz H2 6 tactical_squad soar Marcus Avila
big_grizz H2 13 dreadnought soar Easton Morgan
big_grizz H2 22 storm_raven soar Steve Eddins Norman
eric H3 22 night_scythe soar Zexy Destroyer
eric H3 24 royal_warden soar Julia Clarke
eric H3 26 necron_warriors soar King Larson
eric I4 15 night_scythe soar Lazy-assed Bandit
eric I4 16 overlord soar Aurora Soto
eric I4 17 royal_warden soar Alexa Davidson
eric I4 18 necron_warriors soar Paisley Molina
#print(draw_map(res))
print(draw_map(res, "big_grizz"))

print(draw_map(res, "chris"))

print(draw_map(res, "eric"))

Resolve conflicts

# modify_unit(game, "big_grizz", "A2",   "control","A3")
# res <- reconcile_player_orders(game)
# print(draw_map(res, "big_grizz"))

TURN 2

Players change their maps (making orders)

modify_unit(game, "big_grizz", moby_units[1],   "move",  "B4")
modify_unit(game, "big_grizz", moby_units[7],   "move",  "D2")
modify_unit(game, "big_grizz", moby_units[6],   "move",  "H5")
modify_unit(game, "big_grizz", moby_units[c(3, 5, 13, 22)],   "control",  "H2")
modify_unit(game, "big_grizz", moby_units[c(8, 23)],   "control",  "C5")
modify_unit(game, "big_grizz", moby_units[9],   "control",  "F5")
modify_unit(game, "big_grizz", moby_units[c(10:12, 16)],   "move",  "B4")
modify_unit(game, "big_grizz", moby_units[c(14:15, 19:21)],   "move",  "C5")

modify_unit(game, "eric",      eric_units[c(1:6, 13:14, 8:11)],   "move",  "E5")
modify_unit(game, "eric",      eric_units[7],     "move","E7")
modify_unit(game, "eric",      eric_units[12],     "move","F2")
modify_unit(game, "eric",      eric_units[c(15,18)],     "control","I4")
modify_unit(game, "eric",      eric_units[16:17],   "move","I5")
modify_unit(game, "eric",      eric_units[19],   "control","G6")
modify_unit(game, "eric",      eric_units[20],   "move","E3")
modify_unit(game, "eric",      eric_units[21],   "move","A8")
modify_unit(game, "eric",      eric_units[c(22:24, 26)],   "move","H2")
modify_unit(game, "eric",      eric_units[25],   "control","G8")
modify_unit(game, "eric",      eric_units[27],   "move","F5")
modify_unit(game, "eric",      eric_units[28],   "move","H3")

modify_unit(game, "chris",     chris_units[c(6)],  "move","A4")
modify_unit(game, "chris",     chris_units[c(13)],  "control","A2")
modify_unit(game, "chris",     chris_units[c(5, 12, 23)],  "move","B2")
modify_unit(game, "chris",     chris_units[c(7, 8)],  "control","A3")
modify_unit(game, "chris",     chris_units[1],  "move","A8")
modify_unit(game, "chris",     chris_units[c(14)],  "control","A6")
modify_unit(game, "chris",     chris_units[c(10, 24)],  "move","A8")
modify_unit(game, "chris",     chris_units[c(3,17, 18, 22)],  "move","B9")
modify_unit(game, "chris",     chris_units[c(9)],  "control","A7")
modify_unit(game, "chris",     chris_units[2],  "move","E1")
modify_unit(game, "chris",     chris_units[19],  "move","E1")
modify_unit(game, "chris",     chris_units[21],  "move","B6")
modify_unit(game, "chris",     chris_units[c(4)],  "move","B8")
modify_unit(game, "chris",     chris_units[c(15)],  "move","B9")
modify_unit(game, "chris",     chris_units[20],  "move","E2")
modify_unit(game, "chris",     chris_units[11],  "move","B7")
modify_unit(game, "chris",     chris_units[c(16, 25)],  "control","A5")

Attempt to reconcile moves.

res <- reconcile_player_orders(game)
## Warning: Unnamed `col_types` should have the same length as `col_names`. Using
## smaller of the two.
## CONFLICT(s):
## Warning: Conflict is at hand! Please resolve territorial disputes.
print(draw_map(res))

knitr::kable(add_keywords(res))
player loc unit_id unit_type action unit_name control transport fast fly soar deep sneak
chris A8 1 flying_hive_tryant move Lucky Demon FALSE FALSE TRUE TRUE TRUE FALSE FALSE
chris A8 10 genestealers move Aaliyah Warner TRUE FALSE FALSE FALSE FALSE FALSE TRUE
chris A8 24 biovores move Grace Wagner FALSE FALSE FALSE FALSE FALSE FALSE FALSE
eric A8 21 canoptek_scarab_swarms move Ol’ Dirty Mastermind FALSE FALSE TRUE TRUE FALSE FALSE FALSE
big_grizz F5 9 infiltrators control Kinsley Roman TRUE FALSE FALSE FALSE FALSE FALSE TRUE
eric F5 27 canoptek_scarab_swarms move Gwyneth Paltrow FALSE FALSE TRUE TRUE FALSE FALSE FALSE
big_grizz H2 3 techmarine control Gianna Walsh FALSE FALSE FALSE FALSE FALSE FALSE FALSE
big_grizz H2 5 tactical_squad control Faith Lane TRUE FALSE FALSE FALSE FALSE FALSE FALSE
big_grizz H2 13 dreadnought control Easton Morgan FALSE FALSE FALSE FALSE FALSE FALSE FALSE
big_grizz H2 22 storm_raven control Steve Eddins Norman FALSE TRUE TRUE TRUE TRUE FALSE FALSE
eric H2 22 night_scythe move Zexy Destroyer FALSE TRUE FALSE TRUE TRUE FALSE FALSE
eric H2 23 overlord move Gavin Warren FALSE FALSE FALSE FALSE FALSE FALSE FALSE
eric H2 24 royal_warden move Julia Clarke FALSE FALSE FALSE FALSE FALSE FALSE FALSE
eric H2 26 necron_warriors move King Larson TRUE FALSE FALSE FALSE FALSE FALSE FALSE

Resolve conflicts

# retreats
modify_unit(game, "eric", "F5",   "move","F8")
kill_unit(game, "eric", eric_units[21])
modify_unit(game, "eric", "H2",   "move","H3")

res <- reconcile_player_orders(game)
## Warning: Unnamed `col_types` should have the same length as `col_names`. Using
## smaller of the two.
## All units resolved.
knitr::kable(res)
player loc unit_id unit_type action unit_name
chris A2 13 ripper_swarms control Edmund Burke
chris A3 7 tyranid_warriors control Taylor Rodgers
chris A3 8 tyranid_warriors control Aubrey Medina
chris A4 6 tyranid_warriors move Charlotte Jenkins
chris A5 16 hive_guard control Connor Gutierrez
chris A5 25 tyrannocyte control Michael Crichton
chris A6 14 ripper_swarms control Julia Kristeva
chris A7 9 genestealers control Logan Turner
chris A8 1 flying_hive_tryant move Lucky Demon
chris A8 10 genestealers move Aaliyah Warner
chris A8 24 biovores move Grace Wagner
chris B2 5 neurothrope move Bittah Specialist
chris B2 12 hormagaunts move Daniel Silva
chris B2 23 biovores move Isaac Carpenter
big_grizz B4 1 ravenwing_talonmaster move Henry Fonda
big_grizz B4 10 ravenwing_bike_squad move Robert Downey
big_grizz B4 11 ravenwing_attack_bike move Fred MacMurray
big_grizz B4 12 ravenwing_attack_bike move Jean Simmons
big_grizz B4 16 ravenwing_apothecary move Salman Khan
chris B6 21 gargoyles move Dogface Desperado
chris B7 11 termagants move Adrian Mcdaniel
chris B8 4 broodlord move Judith Sherman
chris B9 3 broodlord move Michael Fine
chris B9 15 ripper_swarms move Zoe Barrett
chris B9 17 maleceptor move Rowan Fitzgerald
chris B9 18 venomthropes move Makayla Ross
chris B9 22 exocrine move Jesus Andrews
big_grizz C5 8 tactical_squad control Trinity Schroeder
big_grizz C5 23 rhino control Bob Bergen
big_grizz C5 14 redemptor_dreadnought move Emery Gallegos
big_grizz C5 15 invictor_tactical_warsuit move Phil Ramone
big_grizz C5 19 vindicare_assassin move Toto
big_grizz C5 20 eliminators move Quincy Jones
big_grizz C5 21 eradicators move Kaleb Daniels
big_grizz D2 7 tactical_squad move Elias Figueroa
big_grizz D4 2 deathwing_captain control Aristotle
big_grizz D4 4 phobos_librarian control Bee Gees, Albhy Galuten & Karl Richardson
big_grizz D4 17 deathwing_terminators control Alan Watts
big_grizz D4 18 deathwing_knights control Gottfried Leibniz
chris E1 2 flying_hive_tryant move Shriekin’ Worlock
chris E1 19 raveners move Lin-Manuel Miranda
chris E2 20 gargoyles move Andy Serkis
eric E3 20 canoptek_scarab_swarms move Smilin’ Swami
eric E5 1 trazyn_the_infinite move Oliver Reyes
eric E5 2 illuminor_szeras move Christopher Rivas
eric E5 3 technomancer move Jean-Paul Sartre
eric E5 4 lychgaurd move Alice Carrillo
eric E5 5 skorpekh_destroyers move Adalynn Mcgee
eric E5 6 canoptek_plasmacyte move The God
eric E5 8 canoptek_spyders move Violent Observer
eric E5 9 canoptek_spyders move Wicked Commander
eric E5 10 cryptothralls move Alexander Ortega
eric E5 11 cryptothralls move Layla Fleming
eric E5 13 canoptek_wraiths move Benedict Cumberbatch
eric E5 14 deathmarks move George Berkeley
eric E7 7 immortals move Isabella Calderon
eric F2 12 canoptek_scarab_swarms move John Wayne
big_grizz F5 9 infiltrators control Kinsley Roman
eric F8 27 canoptek_scarab_swarms move Gwyneth Paltrow
eric G6 19 immortals control Jaxson Delacruz
eric G8 25 immortals control Lillian Pham
big_grizz H2 3 techmarine control Gianna Walsh
big_grizz H2 5 tactical_squad control Faith Lane
big_grizz H2 13 dreadnought control Easton Morgan
big_grizz H2 22 storm_raven control Steve Eddins Norman
eric H3 22 night_scythe move Zexy Destroyer
eric H3 23 overlord move Gavin Warren
eric H3 24 royal_warden move Julia Clarke
eric H3 26 necron_warriors move King Larson
eric H3 28 canoptek_scarab_swarms move Marlon Brando
big_grizz H5 6 tactical_squad move Marcus Avila
eric I4 15 night_scythe control Lazy-assed Bandit
eric I4 18 necron_warriors control Paisley Molina
eric I5 16 overlord move Aurora Soto
eric I5 17 royal_warden move Alexa Davidson
eric NA 21 canoptek_scarab_swarms NA Ol’ Dirty Mastermind
print(draw_map(res))

print(draw_map(res, "big_grizz"))

print(draw_map(res, "chris"))

print(draw_map(res, "eric"))